<template>
  <div class="title-bar">
    <span class="back" @click="back">&lt;</span>
    <span class="title">111</span>
  </div>
</template>

<script>
export default {
  name: 'TitleBar',
  methods: {
    back() {
      // console.log(this.$router)
      // this.$router.back() // 后退
      console.log('返回')
    }
  }
}
</script>

<style lang="scss" scoped>
.title-bar {
    height: 50px;
    line-height: 50px;
    background-color: #FF852A;
    color: #fff;
    display: flex;
    .back {
      padding: 0 12px;
      font-size: 25px;
      display: inline-block;
      font-family: '楷体';
      padding-left: 15px;
    }
    .title {
      flex: 1;
      text-align: center;
      margin-right: 20px;
    }
  }
</style>
